#set(pageTitle='api测试数据')
#@_layout()
#define content()
<h2>以下所有API均为resful方式对接，说明如下：</h2>
<table class="bordered">
    <thead>

    <tr>
        <th width="10%">业务类型</th> 
         <th>api</th>       
        <th>请求方式</th>
        <th>参数</th>
        <th>响应类型</th>
        <th>响应格式</th>
        <th>其他说明</th>
    </tr>
    </thead> 
    <tr>
        <td>插入纪录</td>  <td>/kv/insert</td>      
        <td>get、post</td> 
        <td>[key,value] 
        </td>
        <td>JSON
        </td>
        <td>{"succeed":true,"msg":"恭喜您，成功！","model":null}</td>
         <td>key不可与已有key值重复，如果重复则无法插入
        </td>
    </tr> 
    <tr>
        <td>更新纪录</td>  
         <td>/kv/update</td>            
        <td>get、post</td> 
        <td>[id,key,value] 
        </td>
        <td>JSON
        </td>
        <td>{"succeed":true,"msg":"恭喜您，成功！","model":null}</td>
         <td>key不可与已有key值重复，如果重复则无法更新
        </td>
    </tr> 
      <tr>
        <td>删除记录</td>  
         <td>/kv/delete</td>            
        <td>get、post</td> 
        <td>[id] 
        </td>
        <td>JSON
        </td>
        <td>{"succeed":true,"msg":"恭喜您，成功！","model":null}</td>
         <td>
        </td>
    </tr> 
     <tr>
        <td>唯一查询</td>  
         <td>/kv/find</td>            
        <td>get、post</td> 
        <td>[id] 
        </td>
        <td>JSON
        </td>
        <td>{"succeed":true,"msg":"恭喜您，成功！","model":{"id":1,"key":"name","value":"乔峰"}}</td>
         <td>
        </td>
    </tr> 
    
  <tr>
        <td>分页查询记录</td>  
         <td>/kv/search</td>            
        <td>get、post</td> 
        <td>[keyword,pageIndex,pageSize] 
        </td>
        <td>JSON
        </td>
        <td> {"succeed":true,"msg":"恭喜您，成功！","model":{"count":3,"rows":[{"id":4,"key":"姓名1","value":"乔峰"},{"id":3,"key":"阿拉宝","value":"你就是一个阿拉宝"},{"id":1,"key":"name","value":"乔峰"}]}}
         <td>
         	传入的keyword会匹配key与value字段,pageIndex是页码，pageSize是每页显示条数
        </td>
    </tr> 



</table>
 

#end
